import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import * as path from "path"; // 新增
import tailwindcss from "tailwindcss";
import autoprefixer from "autoprefixer";

// 新增
const resolve = (p: string) => {
  return path.resolve(__dirname, p);
};
// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      "@": resolve("./src"),
    },
  },
  plugins: [vue()],
  css: {
    postcss: {
      plugins: [tailwindcss, autoprefixer],
    },
  },
});
